import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
    state: {
        //菜单收缩
        collapse: false,
        //用户信息
        user: {}
    },
    getters: {},
    mutations: {
        // 修改菜单功能
        SET_COLLAPSE(state) {
            state.collapse = !state.collapse
        },

        //修改用户信息
        SET_USERDATA(state, payload) {
            state.user = payload
        }
    },
    actions: {},
    modules: {}
})